// lib/services/ble/ble_commands.dart

class BleCmd {
  // 开关机
  static const power = 0x01;

  // 实时温度
  static const tempNow = 0x02;

  // 内灯
  static const innerLight = 0x03;
  static const innerLightState = 0x04;
  static const innerLightLevel = 0x05;

  // 外灯
  static const outerLight = 0x06;
  static const outerLightState = 0x07;
  static const outerLightLevel = 0x08;

  // 彩灯
  static const rgbState = 0x09;
  static const rgbSwitch = 0x0A;
  static const rgbLevel = 0x0B;
  static const rgbColor = 0x0C;
  static const rgbMode = 0x0D;
  static const rgbModeGet = 0x1D;

  // 臭氧
  static const ozone = 0x0E;

  // 负离子
  static const ion = 0x0F;
  static const ionTime = 0x10;

  // 心率
  static const heart = 0x11;

  // 功率比
  static const powerRate = 0x12;

  // 红光
  static const red = 0x13;

  // 座椅/脚底
  static const seat = 0x14;
  static const foot = 0x15;

  // 风扇
  static const fan = 0x16;

  // 温度设定（℃/℉）
  static const tempSetC = 0x22;
  static const tempSetF = 0x23;
  static const tempSetGet = 0x24;

  // 时间设定（分钟）
  static const timeSet = 0x25;
  static const timeGet = 0x26;

  // 剩余时间
  static const timeLeft = 0x27;
}

/// 公用 ASCII 工具
class Ascii {
  static List<int> fromInt(int v) {
    return v.toString().padLeft(2, '0').codeUnits;
  }
}
